
<link rel="stylesheet" type="text/css" href="/public/store/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/public/store/daterangepicker-bs3.css">
<ol class="breadcrumb">
    <li><a href="/store">管理</a></li>
    <li><a href="/store">会员管理</a></li>
    <li class="active"><a href="memberList">会员管理</a></li>
</ol>
<!-- seat end -->
<div class="row">
    <div class="container-fluid">
    </div>
    <!-- rightcont end -->
</div>

<script type="text/html" id="checkPassword">
    <input class="form-control">
</script>

<script type="text/html" id="search_tmpl">
    <table width="450" class="panel-table-from">
        <tr>
            <td width="96">会员等级：</td>
            <td>
                <select class="form-control" name="levelId">
                    <option value="">请选择...</option>
                    {{each levelList as li a}}
                    <option value="{{li.id}}">{{li.levelName}}</option>
                    {{/each}}
                </select>
            </td>
        </tr>
        <tr>
            <td>累积消费：</td>
            <td class="form-inline">
                <input type="number" min="0" name="startpay" style="width:160px;" class="form-control" placeholder="0.00" />
                -
                <input type="number" min="0" name="endpay" style="width:160px;" class="form-control" placeholder="200.00" />
            </td>
        </tr>
        <tr>
            <td>积分余额：</td>
            <td class="form-inline">
                <input type="number" min="0" name="startscore" style="width:160px;" class="form-control" placeholder="0" />
                -
                <input type="number" min="0" name="endscore" style="width:160px;" class="form-control" placeholder="200" />
            </td>
        </tr>
        <tr>
            <td>开卡时间：</td>
            <td class="form-inline timebox">
                <input type="text" name="startctime" class="form-control ctime" style="width:160px;" />
                -
                <input type="text" name="endctime" class="form-control ctime" style="width:160px;" />
                <div class="ctimebox" style="position:absolute;width:940px;"></div>
            </td>
        </tr>
        <tr>
            <td>消费时间：</td>
            <td class="form-inline timebox">
                <input type="text" name="startpayTime" class="form-control payTime" style="width:160px;" />
                -
                <input type="text" name="endpayTime" class="form-control payTime" style="width:160px;" />
                <div class="paytimebox" style="position:absolute;width:940px;"></div>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="red">注：不填入信息即该条件视为不限</td>
        </tr>
    </table>
</script>

<script type="text/html" id="chongzhi_tmpl">
    <table width="450" class="panel-table-from">
        <tr>
            <td class="form-inline">
                充值金额（元）：<input id="amount" type="number" min="0" name="amount" style="width:160px;" value="" class="form-control" placeholder="充值金额（元）" />
            </td>
            <td class="form-inline">
                赠送金额（元）：<input type="number" min="0" name="gift" style="width:160px;" value="0" class="form-control" placeholder="赠送金额（元）" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="red">注：充值金额不能为0</td>
        </tr>
    </table>
</script>

<script type="text/html" id="jilulist_tmpl">
    {{each list as vo n}}
        <tr>
            <td width="110" class="text-center" nowrap>{{vo.action}}</td>
            <td width="100" class="text-center" nowrap>{{vo.direction}}{{vo.fee}}</td>
            <td width="260" class="text-center" nowrap>{{vo.date}}</td>
        </tr>
     {{/each}}
</script>

<script type="text/html" id="jiaoyi_tmpl">
    {{if list.length>0}}
    <div class="grid middle">
        <p class="g-col">余额：<span class="red">￥{{money}}</span>(含赠送金额<span class="red">{{giftMoney}}</span>元)</p>
        <p>共有 {{totalRow}} 条交易记录</p>
    </div>
    <table class="table table-bordered from_table" style="margin-bottom:0;border-bottom:0">
        <tr>
            <th width="110" class="text-center" nowrap style="border-bottom:0">交易类型</th>
            <th width="100" class="text-center" nowrap style="border-bottom:0">金额</th>
            <th width="260" class="text-center" nowrap style="border-bottom:0">交易时间</th>
        </tr>
    </table>
    <div class="jilu" style="max-height:380px;overflow-x:hidden;overflow-y:auto;">
        <table class="table table-bordered from_table">
            {{each list as vo n}}
                <tr>
                    <td width="110" class="text-center" nowrap>{{vo.action}}</td>
                    <td width="100" class="text-center" nowrap>{{vo.direction}}{{vo.fee}}</td>
                    <td width="260" class="text-center" nowrap>{{vo.date}}</td>
                </tr>
             {{/each}}
        </table>
        <div id="loading" class="text-center" style="padding:30px;display:none">加载中...</div>
    </div>
    {{else}}
    <div class="gray text-center" style="padding:30px;">无记录...</div>
    {{/if}}
</script>

<script type="text/html" id="list_tmpl">
    <div class="memberbox grid middle">
        <div class="li grid line"><div class="text-center"><p>{{totalMemberCount}}</p>会员总数</div></div>
        <div class="li grid"><div class="text-center"><p class="blue">{{todayMemberCount}}</p>今日增加</div></div>
        <div class="g-col"></div>
    </div>
    <div class="memberbox grid">
        <div class="shai">筛选条件：</div>
        <div class="g-col form-inline" id="searchfrom">
            <input type="text" name="memberName" class="form-control" size="32" placeholder="请输入用户名称" />
            <select class="form-control" name="levelId">
                <option value="">请选择...</option>
                {{each levelList as li a}}
                <option value="{{li.id}}">{{li.levelName}}</option>
                {{/each}}
            </select>
            <div style="padding-top:16px;">
                <button class="btn gn_btn search">筛选</button>
                <button class="btn gn_btn black_btn hisearch">高级筛选</button>
                <button class="btn gn_btn gray_btn reload">刷新</button>
            </div>
        </div>
    </div>
    <table class="table table-bordered from_table">
        <tr>
            <!-- <th class="text-center">卡号ID</th>
            <th class="text-center" nowrap>会员卡</th> -->
            <th class="text-center" nowrap>头像</th>
            <th class="text-center" nowrap>姓名</th>
            <th class="text-center" nowrap>手机号</th>
            <th class="text-center" nowrap>领卡时间</th>
            <th class="text-center" nowrap>余额</th>
            <th class="text-center" nowrap>剩余积分</th>
            <th class="text-center" nowrap>操作</th>
            <th class="text-center" nowrap>充值</th>
        </tr>
        {{each memberPage.list as dd i}}
        <tr class="member-list">
            <!-- <td>{{dd.cardNo}}</td>
            <td class="text-center">{{dd.cardName}}</td> -->
            <td class="text-center" nowrap><img width="42" height="42" src="{{dd.memberAvatar}}" class="img-circle" /></td>
            <td class="text-center" nowrap>{{dd.memberName}}</td>
            <td class="text-center" nowrap>{{dd.memberTel}}</td>
            <td class="text-center" nowrap>{{dd.ctime}}</td>
            <td class="text-center member{{i}}">￥{{dd.totalMoney}}（含赠送金额{{dd.giftMoney}}元）</td>
            <td class="text-center" nowrap>{{dd.score}}</td>
            <td class="text-center blue hand jiaoyi" nowrap data-i="{{i}}"> 交易记录 </td>
            <td class="text-center blue hand chongzhi" nowrap data-i="{{i}}"> 后台充值 </td>
        </tr>
        {{/each}}
    </table>
    {{if memberPage.totalPage>1}}
    <nav class="text-right">
        <ul class="pagination">
            {{if memberPage.pageNumber>1}}
            <li>
                <a href="{{memberPage.pageNumber-1}}" aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
            </li>
            {{/if}}
            {{for var i = memberPage.pageNumber-5; i < memberPage.pageNumber + 5; i++}}
            {{if i>0 && i <= memberPage.totalPage}}
            <li{{if i == memberPage.pageNumber}} class="active"{{/if}}><a href="{{i}}">{{i}}</a></li>
            {{/if}}
            {{/for}}
            {{if memberPage.pageNumber<memberPage.totalPage}}
            <li>
                <a href="{{memberPage.pageNumber+1}}" aria-label="Next">
                    <span aria-hidden="true">下一页</span>
                </a>
            </li>
            {{/if}}
        </ul>
    </nav>
    {{/if}}
</script>

    <!--引入插件js代码-->
<script src="/public/store/moment.js"></script>
<script src="/public/store/daterangepicker.js"></script>